<?php

$username = $_GET["username"];
$password = $_GET["password"];

$con = mysqli_connect("localhost" , "root" , "123456" , "bk2105");

$password = md5($password);

$sql_select =  "SELECT * FROM `usertable` WHERE `username` = '$username' AND `password`='$password'"; 

$res = mysqli_query($con , $sql_select);

$res = mysqli_fetch_all( $res , MYSQLI_ASSOC );

if( sizeof($res) >= 1 ){
      echo json_encode($res);
}else{
      echo "账号和密码不符";
}

mysqli_close( $con );


